package com.lxp.kotlintest.model

import com.lxp.kotlintest.bean.news.NewsInfo
import com.lxp.kotlintest.contract.NewsContract
import com.lxp.kotlintest.http.RetrofitManager
import com.lxp.kotlintest.thread.SchedulerUtils
import io.reactivex.Observable

class NewsMosel {

    fun getNewsList(type: String, key: String): Observable<NewsInfo> {
        return RetrofitManager.service.getNewsList(key, type).compose(SchedulerUtils.ioToMain())
    }
}